3.1.17 \(\int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^3} \, dx\) [17]

Optimal. Leaf size=38 \[ -\frac {(a+a \sec (e+f x))^2 \tan (e+f x)}{5 f (c-c \sec (e+f x))^3} \]

[Out]

-1/5*(a+a*sec(f*x+e))^2*tan(f*x+e)/f/(c-c*sec(f*x+e))^3

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.031, Rules used = {4035} \begin {gather*} -\frac {\tan (e+f x) (a \sec (e+f x)+a)^2}{5 f (c-c \sec (e+f x))^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(Sec[e + f*x]*(a + a*Sec[e + f*x])^2)/(c - c*Sec[e + f*x])^3,x]

[Out]

-1/5*((a + a*Sec[e + f*x])^2*Tan[e + f*x])/(f*(c - c*Sec[e + f*x])^3)

Rule 4035

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))
^(n_.), x_Symbol] :> Simp[b*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((c + d*Csc[e + f*x])^n/(a*f*(2*m + 1))), x] /
; FreeQ[{a, b, c, d, e, f, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && EqQ[m + n + 1, 0] && NeQ[2*m
 + 1, 0]

Rubi steps

\begin {align*} \int \frac {\sec (e+f x) (a+a \sec (e+f x))^2}{(c-c \sec (e+f x))^3} \, dx &=-\frac {(a+a \sec (e+f x))^2 \tan (e+f x)}{5 f (c-c \sec (e+f x))^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 25, normalized size = 0.66 \begin {gather*} \frac {a^2 \cot ^5\left (\frac {1}{2} (e+f x)\right )}{5 c^3 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(Sec[e + f*x]*(a + a*Sec[e + f*x])^2)/(c - c*Sec[e + f*x])^3,x]

[Out]

(a^2*Cot[(e + f*x)/2]^5)/(5*c^3*f)

________________________________________________________________________________________

Maple [A]
time = 0.18, size = 23, normalized size = 0.61

method result size
derivativedivides \(\frac {a^{2}}{5 f \,c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}\) \(23\)
default \(\frac {a^{2}}{5 f \,c^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}\) \(23\)
risch \(\frac {2 i a^{2} \left (5 \,{\mathrm e}^{4 i \left (f x +e \right )}+10 \,{\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{5 f \,c^{3} \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )^{5}}\) \(50\)
norman \(\frac {\frac {a^{2}}{5 c f}-\frac {2 a^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5 c f}+\frac {a^{2} \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{5 c f}}{\left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2} c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}\) \(87\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c-c*sec(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

1/5/f*a^2/c^3/tan(1/2*f*x+1/2*e)^5

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 205 vs. \(2 (40) = 80\).
time = 0.28, size = 205, normalized size = 5.39 \begin {gather*} \frac {\frac {a^{2} {\left (\frac {10 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {15 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} + 3\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}} - \frac {a^{2} {\left (\frac {10 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {15 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - 3\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}} - \frac {6 \, a^{2} {\left (\frac {5 \, \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - 1\right )} {\left (\cos \left (f x + e\right ) + 1\right )}^{5}}{c^{3} \sin \left (f x + e\right )^{5}}}{60 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c-c*sec(f*x+e))^3,x, algorithm="maxima")

[Out]

1/60*(a^2*(10*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 15*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 3)*(cos(f*x + e)
+ 1)^5/(c^3*sin(f*x + e)^5) - a^2*(10*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 - 15*sin(f*x + e)^4/(cos(f*x + e) +
1)^4 - 3)*(cos(f*x + e) + 1)^5/(c^3*sin(f*x + e)^5) - 6*a^2*(5*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 - 1)*(cos(f
*x + e) + 1)^5/(c^3*sin(f*x + e)^5))/f

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 89 vs. \(2 (40) = 80\).
time = 2.50, size = 89, normalized size = 2.34 \begin {gather*} \frac {a^{2} \cos \left (f x + e\right )^{3} + 3 \, a^{2} \cos \left (f x + e\right )^{2} + 3 \, a^{2} \cos \left (f x + e\right ) + a^{2}}{5 \, {\left (c^{3} f \cos \left (f x + e\right )^{2} - 2 \, c^{3} f \cos \left (f x + e\right ) + c^{3} f\right )} \sin \left (f x + e\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c-c*sec(f*x+e))^3,x, algorithm="fricas")

[Out]

1/5*(a^2*cos(f*x + e)^3 + 3*a^2*cos(f*x + e)^2 + 3*a^2*cos(f*x + e) + a^2)/((c^3*f*cos(f*x + e)^2 - 2*c^3*f*co
s(f*x + e) + c^3*f)*sin(f*x + e))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {a^{2} \left (\int \frac {\sec {\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx + \int \frac {2 \sec ^{2}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx + \int \frac {\sec ^{3}{\left (e + f x \right )}}{\sec ^{3}{\left (e + f x \right )} - 3 \sec ^{2}{\left (e + f x \right )} + 3 \sec {\left (e + f x \right )} - 1}\, dx\right )}{c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))**2/(c-c*sec(f*x+e))**3,x)

[Out]

-a**2*(Integral(sec(e + f*x)/(sec(e + f*x)**3 - 3*sec(e + f*x)**2 + 3*sec(e + f*x) - 1), x) + Integral(2*sec(e
 + f*x)**2/(sec(e + f*x)**3 - 3*sec(e + f*x)**2 + 3*sec(e + f*x) - 1), x) + Integral(sec(e + f*x)**3/(sec(e +
f*x)**3 - 3*sec(e + f*x)**2 + 3*sec(e + f*x) - 1), x))/c**3

________________________________________________________________________________________

Giac [A]
time = 0.54, size = 22, normalized size = 0.58 \begin {gather*} \frac {a^{2}}{5 \, c^{3} f \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c-c*sec(f*x+e))^3,x, algorithm="giac")

[Out]

1/5*a^2/(c^3*f*tan(1/2*f*x + 1/2*e)^5)

________________________________________________________________________________________

Mupad [B]
time = 1.64, size = 22, normalized size = 0.58 \begin {gather*} \frac {a^2\,{\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5}{5\,c^3\,f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(e + f*x))^2/(cos(e + f*x)*(c - c/cos(e + f*x))^3),x)

[Out]

(a^2*cot(e/2 + (f*x)/2)^5)/(5*c^3*f)

________________________________________________________________________________________